Optimal. Leaf size=24 \[ \frac{B \tan (c+d x)}{d}+\frac{C \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0623378, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {3010, 2748, 3767, 8, 3770} \[ \frac{B \tan (c+d x)}{d}+\frac{C \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3010
Rule 2748
Rule 3767
Rule 8
Rule 3770
Rubi steps
\begin{align*} \int \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^3(c+d x) \, dx &=\int (B+C \cos (c+d x)) \sec ^2(c+d x) \, dx\\ &=B \int \sec ^2(c+d x) \, dx+C \int \sec (c+d x) \, dx\\ &=\frac{C \tanh ^{-1}(\sin (c+d x))}{d}-\frac{B \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=\frac{C \tanh ^{-1}(\sin (c+d x))}{d}+\frac{B \tan (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.007535, size = 24, normalized size = 1. \[ \frac{B \tan (c+d x)}{d}+\frac{C \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.033, size = 32, normalized size = 1.3 \begin{align*}{\frac{B\tan \left ( dx+c \right ) }{d}}+{\frac{C\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.32283, size = 51, normalized size = 2.12 \begin{align*} \frac{C{\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, B \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.65652, size = 162, normalized size = 6.75 \begin{align*} \frac{C \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - C \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.40596, size = 85, normalized size = 3.54 \begin{align*} \frac{C \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - C \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - \frac{2 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]